package com.maidada.mddaichat.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.maidada.mddaichat.entity.AiModel;
import com.maidada.mddaichat.mapper.AiModelMapper;
import com.maidada.mddaichat.service.AiModelService;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * [AI模型表]服务实现类
 *
 * @author wulinxuan
 * @date 2025-04-17 17:43
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class AiModelServiceImpl extends ServiceImpl<AiModelMapper, AiModel> implements AiModelService {

    private final AiModelMapper aiModelMapper;

    @Override
    public AiModel getByModelName(String model) {
        return lambdaQuery().eq(AiModel::getModelName, model).one();
    }
}
